<template>
<div>
  <v-form-designer ref="vForm" :designer-config="designerConfig"></v-form-designer>
  <el-button @click="getJson">获取json</el-button>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        designerConfig:{
          externalLink:false,
          logoHeader:false,
        }
      }
    },
    mounted(){
      let that = this;
      window.fetch("./vform1.json").then(res=>{
        return res.json()
      }).then(res=>{
        console.log(res)
        that.$refs.vForm.setFormJson(res)
      })
    },
    methods:{
      getJson(){
        console.log(this.$refs.vForm.getFormJson())
      }
    }
  }
</script>

<style >
body {
  margin: 0;  /* 如果页面出现垂直滚动条，则加入此行CSS以消除之 */
}
</style>